Pressure sensor attachment structure

ABSTRACT

A sensor attachment structure of an oil pressure sensor suitable for use as a control valve of an automobile transmission includes a sensor case inserted into an accommodation space 4 of a valve upper-body portion such that a body portion of the sensor case is capable of rotating about a vertical central axis. A stopper projects in a horizontal direction from the upper body, the stopper being movable vertically in a guide groove of the sensor case, and a rotatable relative to a restricting portion of the central case to restrict a vertical movement of the stopper to prevent the oil pressure sensor from falling off the upper body.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of priority to Japanese PatentApplication No. 2016-153214 filed on Aug. 3, 2016. The entire contentsof this application are hereby incorporated herein by reference.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a sensor attachment structure that issuitable for use in, for example, a control valve of an automobiletransmission.

2. Description of the Related Art

Automatic transmissions of vehicles include a control valve forcontrolling a transmission mechanism. The control valve controls thetransmission mechanism by supplying or stopping supplying apredetermined oil pressure to the transmission mechanism by using asolenoid valve. Some existing control valves include a valve body inwhich an upper body is superposed on a lower body. An oil passage, inwhich hydraulic oil flows, is formed in the valve body. A solenoid valvefor switching oil pressure and a sensor for detecting oil pressure inthe oil passage are disposed in the valve body.

In most existing control valves, electronic devices, such as a sensor,are independently attached onto the valve body. As reduction in size hasbeen needed in recent years, for example, control valves are required tohave a built-in structure illustrated in FIG. 8, in which an oilpressure sensor 3 is held between an upper body 1 and a lower body 2.

For example, such a structure is described in Japanese Unexamined PatentApplication Publication No. 2010-174991, Domestic Re-publication of PCTInternational Publication for Patent Application No. 2010/058800, andJapanese Unexamined Patent Application Publication No. 2011-134801.

FIG. 9 illustrates a method used in existing technologies to hold theoil pressure sensor 3 between the upper body 1 and the lower body 2. Inthis method, first, the upper body 1 is turned upside down so that alower surface thereof faces upward, the oil pressure sensor 3 is turnedupside down, and the oil pressure sensor 3 is inserted into anaccommodation space 4 in the upper body 1. Next, in a state in which theoil pressure sensor 3 is fitted into the accommodation space 4, theupper body 1 is turned right side up and superposed on the lower body 2,and the upper body 1 and the lower body 2 are fixed to each other.

If the oil pressure sensor 3 is first placed on the lower body 2 andthen the upper body 1 is superposed on the lower body 2, the oilpressure sensor 3 and the accommodation space 4 are hidden by the upperbody 1, it is difficult to adjust the positions of the oil pressuresensor 3 and the accommodation space 4 relative to each other, and it isdifficult to insert the oil pressure sensor 3 into the accommodationspace 4. Therefore, as described above, the oil pressure sensor 3 isattached to the upper body 1 in a state in which the upper body 1 isturned upside down.

However, with such a method, after the oil pressure sensor 3 has beenattached and when the upper body 1 is turned right side up to besuperposed on the lower body 2, the oil pressure sensor 3, which hasbeen fitted into the accommodation space 4, may fall due to its ownweight. Therefore, an operator needs to superpose the upper body 1 onthe lower body 2 to adjust the positions of the upper body 1 and thelower body relative to each other while pressing the oil pressure sensor3 so that the oil pressure sensor 3 may not fall. Thus, this method hasa problem of very low workability. Moreover, there is a probability thatthe oil pressure sensor 3 becomes damaged, because an operator cannotavoid fall of the oil pressure sensor 3 from the upper body 1 even whenthe operator pays attention.

The present invention has been conceived to provide a sensor attachmentstructure which prevents an oil pressure sensor from falling from anupper body even when the upper body is turned upside down, and whichallows installation of the oil pressure sensor and positioning of theupper body and a lower body to be accomplished by simple operations.

SUMMARY OF THE INVENTION

A sensor attachment structure according to a preferred embodiment of thepresent invention includes an oil pressure sensor including a sensorcase and a pressure sensor element accommodated in the sensor case, thesensor case including a body portion having a circular horizontalsection; and a valve body including an upper body and a lower body, theupper body including an accommodation space having a wall surface havinga circular horizontal section, the accommodation space having the bodyportion inserted therein such that the body portion is capable ofrotating about a central axis thereof extending in a vertical direction,the lower body including an oil passage arranged to extend therethroughtoward the upper body. The sensor case includes a stopper arranged toproject in a horizontal direction in an outer circumferential surface ofthe body portion. The accommodation space includes a guide groovearranged to extend in the vertical direction at the wall surfacethereof, the guide groove being arranged to allow the stopper to movetherein. The upper body includes a restricting portion arranged torestrict a vertical movement of the stopper in a situation in which thebody portion is disposed in the accommodation space. A space portionallowing the stopper to move therein is arranged between the guidegroove and the restricting portion.

The sensor attachment structure according to the above preferredembodiment of the present invention preferably has the followingfeatures: the accommodation space is a through hole defined in the upperbody; the restricting portion is a portion of an upper edge of thethrough hole, the portion including no portion of the guide groove; andthe space portion is a space adjoining the upper edge of the throughhole and connected to an upper portion of the guide groove.

A sensor attachment structure according to another preferred embodimentof the present invention includes an oil pressure sensor including asensor case and a pressure sensor element accommodated in the sensorcase, the sensor case including a body portion having a circularhorizontal section; and a valve body including an upper body and a lowerbody, the upper body including an accommodation space having a wallsurface having a circular horizontal section, the accommodation spacehaving the body portion inserted therein such that the body portion iscapable of rotating about a central axis thereof extending in a verticaldirection, the lower body including an oil passage arranged to extendtherethrough toward the upper body. The sensor case includes a stopperarranged to project in a horizontal direction toward an interior of theaccommodation space at the wall surface of the accommodation space. Anouter circumferential surface of the body portion includes a guidegroove arranged to extend in the vertical direction and allow thestopper to move therein. The outer circumferential surface of the bodyportion includes a restricting portion arranged to restrict a verticalmovement of the stopper in a situation in which the body portion hasbeen inserted in the accommodation space. A space portion allowing thestopper to move therein is arranged between the guide groove and therestricting portion.

The sensor attachment structure according to the other preferredembodiment of the present invention preferably has the followingfeatures: the space portion is a horizontal groove arranged to extend ina circumferential direction at the outer circumferential surface of thebody portion, the horizontal groove being connected to the guide grooveextending in the vertical direction; and the restricting portion isdefined by a lower edge of the horizontal groove.

The sensor attachment structure according to each of the above preferredembodiments of the present invention may additionally have the followingfeatures: the sensor case includes a lower case and an upper case fixedabove the lower case; the upper case is made of a resin, and is arrangedto have the pressure sensor element disposed inside thereof; and thelower case is made of a metal, has arranged inside thereof an oilintroducing space connected to the oil passage defined in the lowerbody, includes a collar portion at an outer circumference thereof, andis held with the collar portion being held between the upper body andthe lower body.

The above and other elements, features, steps, characteristics andadvantages of the present invention will become more apparent from thefollowing detailed description of the preferred embodiments withreference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view of a first preferred embodiment of thepresent invention.

FIG. 2 is a vertical sectional view of the first preferred embodiment.

FIG. 3 is a plan view illustrating engagement between stoppers andrestricting portions according to the first preferred embodiment.

FIG. 4 is a perspective view of a second preferred embodiment of thepresent invention.

FIG. 5 is a vertical sectional view of the second preferred embodiment.

FIG. 6 is a plan view illustrating engagement between stoppers andrestricting portions according to the second preferred embodiment.

FIG. 7 is a vertical sectional view of a modification of the secondpreferred embodiment.

FIG. 8 is a vertical sectional view illustrating a situation in which anoil pressure sensor is attached to a valve body.

FIG. 9 is a perspective view illustrating how oil pressure sensors fallfrom a valve body.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereinafter, preferred embodiments of the present invention will bedescribed. In the figures for each preferred embodiment, members orportions that have their equivalents in a related-art structureillustrated in FIGS. 8 and 9 are denoted by the same reference numeralsas those of their equivalents in the related-art structure, andredundant descriptions of such members and portions will be omitted. Ina description of each preferred embodiment, the term “verticaldirection” refers to a direction in which an upper body and a lower bodyare placed one upon the other, and the term “axis” refers to a centralaxis of an oil pressure sensor extending in the vertical direction. Inaddition, an inner side and an outer side are defined with reference tothe central axis of the oil pressure sensor, and the terms“circumferential direction” and “axial direction” refer to acircumferential direction about the central axis and an axial directionof the central axis, respectively, unless otherwise noted.

1. First Preferred Embodiment

1.1 Structure

A first preferred embodiment of the present invention will now bedescribed below with reference to FIGS. 1, 2, and 3. In the firstpreferred embodiment, stoppers are included in a sensor case, whilerestricting portions are included in an upper body.

A valve body includes an upper body 1 and a lower body 2. The upper body1 includes an accommodation space 4 in which a portion of an oilpressure sensor 3 is accommodated. The lower body 2 includes an oilpassage 21 arranged to extend therethrough and upward toward the upperbody 1, and the oil pressure sensor 3 is fixed at an opening portion ofthe oil passage 21.

The accommodation space 4 is a through hole arranged to pass through theupper body 1 from an upper surface to a lower surface of the upper body1. A case of the oil pressure sensor 3 is inserted upwardly through theaccommodation space 4 along a central axis thereof. An upper edge of thethrough hole, which defines the accommodation space 4, in the uppersurface of the upper body 1 defines restricting portions 52 arranged toprevent stoppers 50, which are included in an upper case 32, from movingdownwardly along the central axis of the oil pressure sensor 3.

A decreased diameter portion 41, which is shaped such that an outercircumferential surface of the upper case 32 of the oil pressure sensor3 can be tightly fitted therein, is arranged in an upper portion of theaccommodation space 4. A horizontal section, that is, a sectionperpendicular to the axis of the oil pressure sensor 3, of the decreaseddiameter portion 41 is smaller than a horizontal section of a lower case31 of the oil pressure sensor 3, and the lower case 31 cannot entirelyenter into the decreased diameter portion 41. An increased diameterportion 42, in which an outer circumferential surface of the lower case31, that is, a collar portion 7 of the lower case 31, is fitted, isarranged in a lower portion of the accommodation space 4. A shoulderportion 43 is defined at a boundary between the decreased diameterportion 41 and the increased diameter portion 42.

The oil pressure sensor 3 is a columnar member having a central axisextending in the vertical direction, and includes the lower case 31 andthe upper case 32, which is fixed above the lower case 31. The lowercase 31 and the upper case 32 correspond to a sensor case of the presentinvention. An outer circumference of the lower case 31 is arranged toproject radially outward, i.e., in a horizontal direction in FIG. 2,beyond an outer circumference of the upper case 32 to assume the shapeof a flange, and defines the collar portion 7.

An oil introducing space 34 is defined in the lower case 31. The oilintroducing space 34 is arranged to open into the oil passage 21 at oneend, and is closed at another end with a flexible plate 33 which is tobe deformed in accordance with oil pressure. A groove 35, which isrecessed upward from a lower surface of the lower case 31, is defined inthe lower case 31. The groove 35 is arranged radially outside of the oilpassage 21. A sealant 35 a, such as, for example, an O-ring, is fittedin the groove 35. A surface of contact between the lower case 31 and thelower body 2 is sealed with the sealant 35 a.

A pressure measuring space 36, which is arranged to surround an uppersurface of the flexible plate 33, is defined in the upper case 32. Asupport member 37, a periphery of which is fixed to the upper case 32,is arranged in the pressure measuring space 36. A pressure sensorelement 38 is arranged on a lower surface of the support member 37. Thepressure sensor element 38 is arranged on an opposite side of theflexible plate 33 with respect to the oil introducing space 34. When theflexible plate is deformed by oil pressure from the oil passage 21, thepressure sensor element 38 detects a change in pressure by sensing adeformation of the flexible plate 33.

The upper case 32 is provided with terminal pins 39, each of which hasspring-like elasticity and is connected to the pressure sensor element38. An upper portion of the upper case 32 and the terminal pins 39provided thereat are arranged to project from the accommodation space 4,which is defined in the upper body 1, and are exposed from the uppersurface of the upper body 1.

At a surface of the upper case 32, the stoppers 50, which are two innumber and each of which is arranged to project in a horizontaldirection outwardly away from the central axis of the oil pressuresensor 3, are arranged at regular intervals, that is, at intervals of180 degrees with the axis of the oil pressure sensor 3 as a center.Referring to FIG. 2, each stopper 50 is arranged at a level higher thanthat of a lower surface of the oil pressure sensor 3 by a thickness ofthe upper body 1. A lower surface of each stopper 50 is arranged at alevel substantially the same as that of a lower surface of the uppercase 32.

A distance from the central axis of the oil pressure sensor 3 to aprojecting end of each stopper 50 is arranged to be smaller than aradius of the increased diameter portion 42 of the accommodation space4, so that the stopper 50 can freely move in the vertical direction andin the circumferential direction within the increased diameter portion42 without making contact with a wall surface of the increased diameterportion 42.

The distance from the central axis of the oil pressure sensor 3 to theprojecting end of each stopper 50 is arranged to be greater than aradius of the decreased diameter portion 41. Accordingly, a wall surfaceof the decreased diameter portion 41 of the accommodation space 4 isprovided with guide grooves 51 each of which is arranged to extend inthe vertical direction, and the stoppers 50 are fitted into the guidegrooves 51 such that the stoppers 50 are movable in the verticaldirection. Each guide groove 51 is arranged to open into the increaseddiameter portion 42 of the accommodation space 4 at a lower end thereof,and is arranged to be open at the upper surface of the upper body 1 atan upper end thereof.

The upper body 1 includes the restricting portions 52, each of which isarranged to restrict a vertical movement of a corresponding one of thestoppers 50 in a situation in which the oil pressure sensor 3 isdisposed in the accommodation space 4. In the present preferredembodiment, each restricting portion 52 is a portion of an upper edge ofthe accommodation space 4, the portion including no portion of any guidegroove 51. A space portion, which is arranged to allow the stopper 50 tomove therein when the oil pressure sensor 3 is rotated about the axisthereof extending in the vertical direction in the accommodation space4, is arranged between each guide groove 51 and the correspondingrestricting portion 52. The space portion, which allows the stopper 50to move therein, is a portion of a space above the upper surface of theupper body 1, the portion adjoining the upper edge of the accommodationspace 4 and being connected to an upper-end opening portion of the guidegroove 51.

The first preferred embodiment, which has the above-described structure,has the following advantages.

When the oil pressure sensor 3 is attached to the upper body 1, theupper body 1 is turned upside down, and then, the oil pressure sensor 3,with the terminal pins 39 thereof taking the lead, is inserted into theaccommodation space 4. At this time, the oil pressure sensor 3 isrotated about the axis thereof to allow the stoppers 50 to be fittedinto the guide grooves 51 and to move along the guide grooves 51. Thus,the entire oil pressure sensor 3 can be inserted through theaccommodation space 4, even with the stoppers 50 projecting outwardlyrelative to the wall surface of the decreased diameter portion 41.

When insertion of the oil pressure sensor 3 into the accommodation space4 has been completed, the stoppers 50 have passed through the guidegrooves 51 to be located above the upper body 1 as illustrated in (a) ofFIG. 3. If the oil pressure sensor 3 is rotated about the axis thereofin this situation, each stopper 50 leaves the opening portion of thecorresponding guide groove 51, and slides in the circumferentialdirection along the upper edge of the accommodation space 4. The stopper50 is able to move in the circumferential direction at this time becausethe space portion, which allows the stopper 50 to move therein and whichis connected to the opening portion of the guide groove 51, is providedat the upper surface of the upper body 1.

If each stopper 50 is rotated by 90 degrees as illustrated in (b) ofFIG. 3, for example, the stopper 50 is engaged with the correspondingrestricting portion 52, which is defined at the upper edge of theaccommodation space 4, and is restrained from moving toward the lowerbody 2. At the same time, a portion of the upper case 32 is disposed inthe decreased diameter portion 41 of the accommodation space 4, and aportion of the lower case 31 is disposed in the increased diameterportion 42, and thus, the oil pressure sensor 3 is held in theaccommodation space 4 with a portion of the upper body 1 lying betweenthe stoppers 50 and the shoulder portion 43.

After the oil pressure sensor 3 is temporarily fixed to the upper body 1in the above-described manner, the upper body 1 is turned upside down,and is fitted on an upper surface of the lower body 2, and the upper andlower bodies 1 and 2 are fixed to each other. In this case, the oilpressure sensor 3 does not fall away from a lower surface of the upperbody 1 because the oil pressure sensor 3 is temporarily fixed to theupper body 1.

After the upper and lower bodies 1 and 2 are fixed to each other, thecollar portion 7 of the lower case 31 of the oil pressure sensor 3 isheld between the shoulder portion 43 of the upper body 1 and a surfaceof the lower body 2. Accordingly, even if each stopper 50 is disengagedfrom the corresponding restricting portion 52, the oil pressure sensor 3remains fixed between the upper body 1 and the lower body 2.

The following advantageous effects can be expected from the firstpreferred embodiment.

(1) Provision of the stoppers 50 and the restricting portions 52, whichare arranged to hold the oil pressure sensor 3 in the accommodationspace 4, prevents the oil pressure sensor 3 from falling off the upperbody 1 in an operation stage before the oil pressure sensor 3 is fixedin a built-in manner between the upper and lower bodies 1 and 2 of acontrol valve. This contributes to preventing damage to the oil pressuresensor 3, and simplifying an assembling operation, and leads to improvedproductivity.

(2) Provision of projections as the stoppers 50 at the surface of theupper case 32 allows a simpler structure of the stoppers 50, a simplerstructure of a mold for molding, and higher strength than in a casewhere the upper case 32 is provided with a stopper defined by an elasticmember, and elasticity thereof is used to temporarily fix the oilpressure sensor 3 and the upper body 1 to each other.

(3) Since an edge of the accommodation space 4, which is an openingportion defined in the upper body 1, is used as each restricting portion52, it is not particularly necessary to machine a wall surface of theaccommodation space 4 or the like to form a protrusion or a recesstherein when the accommodation space 4 is defined in the valve body.

(4) Since the collar portion 7 is arranged to extend over the entirecircumferential extent of the lower case 31, the collar portion 7 has alarge area, and can receive a pressing force of the upper body 1 withthe large area. Thus, the lower case 31 can be securely fixed. Inparticular, the upper case 32 is made of a resin, and it is thereforeeasy to define the stoppers 50. The lower case 31, which is held betweenthe upper and lower bodies 1 and 2, may be made of a metal having a highstrength, and in this case, the oil pressure sensor 3 can be securelyfixed by the upper and lower bodies 1 and 2.

2. Second Preferred Embodiment

A second preferred embodiment of the present invention will now bedescribed below with reference to FIGS. 4, 5, and 6. In a description ofthe second preferred embodiment, members or portions that have theirequivalents in the first preferred embodiment are denoted by the samereference numerals as those of their equivalents in the first preferredembodiment, and descriptions of those members or portions are omitted.The second preferred embodiment is different from the first preferredembodiment in that stoppers 50 are included in an upper body 1, whileguide grooves 51 and restricting portions 52 are included in an uppercase 32 of an oil pressure sensor 3.

At an inner circumferential surface of an upper edge portion of anaccommodation space 4, the stoppers 50, which are two in number and eachof which is arranged to project in a horizontal direction toward aninterior of the accommodation space 4, are arranged at regular intervalsin the circumferential direction. Each guide groove 51 is arranged toextend in the vertical direction at an outer circumferential surface ofthe upper case 32, and a horizontal groove 53, which is connected to theguide groove 51 and is arranged to extend in the circumferentialdirection, is arranged at an upper-end opening portion of the guidegroove 51. The stopper 50 is able to move in the guide groove 51 and thehorizontal groove 53. A lower edge of the horizontal groove 53 definesthe restricting portion 52, which is arranged to restrict a verticalmovement of the stopper 50 in a situation in which the oil pressuresensor 3 has been inserted in the accommodation space 4. A space in thehorizontal groove 53 defines a space portion allowing the stopper 50 tomove therein between the guide groove 51 and the restricting portion 52.

The circumferential dimension of each horizontal groove 53 may be justlarge enough to allow the stopper 50 to be engaged with the restrictingportion 52 of the horizontal groove 53, that is, approximately as largeas a circumferential dimension of the stopper 50, for example. In thesecond preferred embodiment, however, the horizontal groove 53 isarranged to extend over an angular range of 90 degrees in thecircumferential direction so that the oil pressure sensor 3 can berotated by 90 degrees in the accommodation space 4.

In the second preferred embodiment, as illustrated in (a) of FIG. 6, theoil pressure sensor 3 is inserted into the accommodation space 4 withthe stoppers 50 entering into the guide grooves 51. If the oil pressuresensor 3 is rotated by 90 degrees in the accommodation space 4 in asituation in which each stopper 50 has reached an upper end of thecorresponding guide groove 51, the stopper 50 enters into thecorresponding horizontal groove 53. Then, if the stopper 50 reaches anend portion of the horizontal groove 53, the stopper 50 is engaged withthe corresponding restricting portion 52 as illustrated in (b) of FIG. 6to prevent the oil pressure sensor 3 from falling off the upper body 1.Thus, advantageous effects similar to those of the first preferredembodiment can be achieved.

In the second preferred embodiment, the guide grooves 51 and thehorizontal grooves 53 are defined in the upper case 32, which is made ofa resin. Therefore, it is possible to define the guide grooves 51 andthe horizontal grooves 53 at one time by a resin molding process using amold, which allows easier manufacture than in the case where the upperbody 1 is made of a metal and the guide grooves 51 are defined in theupper body 1 made of the metal.

3. Other Preferred Embodiments

The present invention is not limited to the above-described preferredembodiments. The above-described preferred embodiments have beenpresented by way of example only, and the present invention can beembodied in a variety of other forms. Various omissions, substitutions,and changes may be made without departing from the scope of theinvention. These preferred embodiments and modifications thereof fallwithin the scope and spirit of the invention and the scope ofequivalents thereof. Examples thereof will now be described below.

(1) A low-profile, so-called button-type oil pressure sensor may be usedas a columnar sensor having a central axis in a preferred embodiment ofthe present invention. In this case, an accommodation space 4 may be arecessed portion defined in a lower surface of an upper body 1 asillustrated in FIG. 7. In FIG. 7, stoppers 50 are included in the upperbody 1. Note, however, that, in the case where the accommodation space 4is the recessed portion, the stoppers 50 may alternatively be defined inan outer circumference of a sensor case, while guide grooves 51 andhorizontal grooves 53 may be defined in a wall surface of theaccommodation space 4, with a lower edge of each horizontal groove 53defining a restricting portion 52.

(2) The number of stoppers 50 included in the sensor case or the upperbody 1 is not limited to two, but may be more than two, as long as thestoppers 50 are arranged at regular intervals in the circumferentialdirection. The number of stoppers may be one as long as the one stopperis so shaped as to be capable of securely fixing the sensor case to theupper body 1.

(3) Each stopper 50 may alternatively be defined by a member separatefrom the case of the oil pressure sensor 3 and the upper body 1, and maybe fixed to the sensor case or the upper body 1 through, for example,screwing, fitting, or adhesion.

(4) The structure of the oil pressure sensor 3 is not limited to thoseof the preferred embodiments illustrated in the figures. Each stoppermay be defined in the lower case 31, the support member 37, or anotherportion of a body portion of the oil pressure sensor, instead of in theupper case 32 as in the first preferred embodiment.

(5) Materials of the upper case 32 and the lower case 31 are not limitedto those of the preferred embodiments illustrated in the figures. Theupper case 32 may be made of, for example, a metal instead of a resin,as long as the stopper 50 can be defined in the upper case 32. The lowercase 31 may alternatively be made of a resin.

(6) The collar portion 7, which is defined in the lower case 31, doesnot need to be in the shape of a flange extending over the entirecircumferential extent of the lower case 31. Projecting portions may bedefined at the outer circumference of the lower case 31 at regularintervals or at appropriate intervals, and upper surfaces of theprojecting portions may be used as the collar portion 7.

Features of the above-described preferred embodiments and themodifications thereof may be combined appropriately as long as noconflict arises.

While preferred embodiments of the present invention have been describedabove, it is to be understood that variations and modifications will beapparent to those skilled in the art without departing from the scopeand spirit of the present invention. The scope of the present invention,therefore, is to be determined solely by the following claims.

What is claimed is:
 1. A sensor attachment structure comprising: an oilpressure sensor including a sensor case and a pressure sensor elementaccommodated in the sensor case, the sensor case including a bodyportion having a circular horizontal section; and a valve body includingan upper body and a lower body, the upper body including anaccommodation space having a wall surface having a circular horizontalsection, the accommodation space having the body portion insertedtherein such that the body portion is capable of rotating about acentral axis thereof extending in a vertical direction, the lower bodyincluding an oil passage arranged to extend therethrough toward theupper body; wherein the upper body includes a stopper arranged toproject in a horizontal direction toward an interior of theaccommodation space at the wall surface of the accommodation space; anouter circumferential surface of the body portion includes a guidegroove arranged to extend in the vertical direction and allow thestopper to move therein; the outer circumferential surface of the bodyportion includes a restricting portion arranged to restrict a verticalmovement of the stopper in a situation in which the body portion hasbeen inserted in the accommodation space; and a space portion allowingthe stopper to move therein is arranged between the guide groove and therestricting portion.
 2. The sensor attachment structure according toclaim 1, wherein the space portion is a horizontal groove arranged toextend in a circumferential direction at the outer circumferentialsurface of the body portion, the horizontal groove being connected tothe guide groove extending in the vertical direction; and therestricting portion is defined by a lower edge of the horizontal groove.3. The sensor attachment structure according to claim 1, wherein thesensor case includes a lower case and an upper case fixed above thelower case; the upper case is made of a resin, and is arranged to havethe pressure sensor element disposed inside thereof; and the lower caseis made of a metal, has arranged inside thereof an oil introducing spaceconnected to the oil passage defined in the lower body, includes acollar portion at an outer circumference thereof, and is held with thecollar portion being held between the upper body and the lower body.